package com.chuhe.starry.service.adapter;

import com.chuhe.common.domain.entity.GroupInfo;
import com.chuhe.common.domain.entity.UserContact;
import com.chuhe.common.domain.enums.UserContactStatusEnum;
import com.chuhe.common.domain.vo.resp.LoadGroupSessionResp;
import com.chuhe.common.domain.vo.resp.UserContactVo;
import com.sun.corba.se.pept.transport.ContactInfo;

import java.util.List;

/**
 * @Author: 楚河
 * @Date: 2025年05月14日20:08
 */
public class LoadOnGroupContactAdapter {
    /**
     * 组装在群组用户基础信息
     * @Author: 楚河
     * @Date: 2025-05-14 20:11
     */
    public static UserContact buildOnGroupContact(GroupInfo groupInfo,String groupId) {
        UserContact userContact = new UserContact();
        userContact.setContactId(groupId);
        userContact.setStatus(UserContactStatusEnum.FRIEND.getStatus());
        return userContact;
    }
    /**
     * 组装在群用户联系人
     * @Author: 楚河
     * @Date: 2025-05-14 20:33
     */
    public static LoadGroupSessionResp buildUserContactList(GroupInfo groupInfo, List<UserContactVo> userContactList) {
        LoadGroupSessionResp loadGroupSessionResp = new LoadGroupSessionResp();
        loadGroupSessionResp.setGroupInfo(groupInfo);
        loadGroupSessionResp.setUserContactList(userContactList);
        return loadGroupSessionResp;
    }
}
